export const SourseList: CommonType.SelectOptionType[] = [
    {
        value: '1',
        label: '抖音'
    },
    {
        value: '2',
        label: '小红书'
    },
    {
        value: '3',
        label: '58同城'
    },
    {
        value: '4',
        label: '快手'
    },
    {
        value: '5',
        label: '视频号'
    },
    {
        value: '6',
        label: '官网'
    },
    {
        value: '7',
        label: '来电'
    },
    {
        value: '8',
        label: '其它'
    }
]

export const CommonOptionsList: CommonType.SelectOptionType[] = [
    {
        label: 'course1',
        value: '1'
    },
    {
        label: 'course2',
        value: '2'
    }
]

export const RelationList: CommonType.SelectOptionType[] = [
    {
        label: '手机号',
        value: '1'
    },
    {
        label: '微信',
        value: '2'
    }
]

export const OrderStateList: CommonType.SelectOptionType[] = [
    {
        label: '未冲单',
        value: '0'
    },
    {
        label: '已冲单',
        value: '1'
    }
]

export const HandleType = {
    EIDT: 'EDIT',
    ADD: 'ADD'
}
// 状态,1-未处理，2-已成交，3-用户退款，4-删除
export const StateList: CommonType.SelectOptionType[] = [
    // {
    //     label: '正常',
    //     value: '1'
    // },
    // {
    //     label: '停用',
    //     value: '0'
    // }
    {
        label: '未处理',
        value: '1'
    },
    {
        label: '已成交',
        value: '2'
    },
    {
        label: '用户退款',
        value: '3'
    },
    {
        label: '删除',
        value: '4'
    }
]

export const DepartmentStateList: CommonType.SelectOptionType[] = [
    {
        label: '正常',
        value: '0'
    },
    {
        label: '停用',
        value: '1'
    }
]

export const UserStateList: CommonType.SelectOptionType[] = [
    {
        label: '正常',
        value: '0'
    },
    {
        label: '关闭',
        value: '1'
    },
    {
        label: '删除',
        value: '2'
    }
]

// 角色id，1-推广员，2-部门经理，3-中心负责人  100-超级管理员
export const RoleList: CommonType.SelectOptionType[] = [
    {
        label: '推广员',
        value: '1'
    },
    {
        label: '部门经理',
        value: '2'
    },
    {
        label: '中心负责人',
        value: '3',
        disabled: true
    },
    {
        label: '超级管理员',
        value: '100',
        disabled: true
    }
]

// 机构类型 线上还是线下  1-线上，2-线下
export const JigouLineType = {
    ON_LINE: '1',
    OFF_LINE: '2'
}

// hooks返回的类型 select类型 和table类型
export const HooksReturnDataType = {
    SELECT: 'SELECT',
    TABLE: 'TABLE'
}
// 级联选择器的自定义value 键值
export const CustomCascaderProps = {
    value: 'id'
}

export const FormatCourseidsAndCityids = (copyRuleForm: Api_ClueManager.OrderForm|SearchFormType) => {
    if (copyRuleForm.courseid?.length === 3) {
        const copyId = [...(copyRuleForm.courseid as any[])]
        copyRuleForm.courseid = copyId[0] + ''
        copyRuleForm.courseid2 = copyId[1] + ''
        copyRuleForm.courseid3 = copyId[2] + ''
    }
    if (copyRuleForm.cityid?.length === 2) {
        const copyId = [...(copyRuleForm.cityid as any[])]
        copyRuleForm.cityid = copyId[1] + ''
    }
    console.log(copyRuleForm);
    
}